package com.ruoyi.daily.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.daily.mapper.XinfengCustomerTrackingMapper;
import com.ruoyi.daily.domain.XinfengCustomerTracking;
import com.ruoyi.daily.service.IXinfengCustomerTrackingService;

/**
 * 客户跟踪/回访Service业务层处理
 * 
 * @author gyy
 * @date 2025-04-21
 */
@Service
public class XinfengCustomerTrackingServiceImpl implements IXinfengCustomerTrackingService 
{
    @Autowired
    private XinfengCustomerTrackingMapper xinfengCustomerTrackingMapper;

    /**
     * 查询客户跟踪/回访
     * 
     * @param id 客户跟踪/回访主键
     * @return 客户跟踪/回访
     */
    @Override
    public XinfengCustomerTracking selectXinfengCustomerTrackingById(Long id)
    {
        return xinfengCustomerTrackingMapper.selectXinfengCustomerTrackingById(id);
    }

    /**
     * 查询客户跟踪/回访列表
     * 
     * @param xinfengCustomerTracking 客户跟踪/回访
     * @return 客户跟踪/回访
     */
    @Override
    public List<XinfengCustomerTracking> selectXinfengCustomerTrackingList(XinfengCustomerTracking xinfengCustomerTracking)
    {
        return xinfengCustomerTrackingMapper.selectXinfengCustomerTrackingList(xinfengCustomerTracking);
    }

    /**
     * 新增客户跟踪/回访
     * 
     * @param xinfengCustomerTracking 客户跟踪/回访
     * @return 结果
     */
    @Override
    public int insertXinfengCustomerTracking(XinfengCustomerTracking xinfengCustomerTracking)
    {
        xinfengCustomerTracking.setCreateTime(DateUtils.getNowDate());
        return xinfengCustomerTrackingMapper.insertXinfengCustomerTracking(xinfengCustomerTracking);
    }

    /**
     * 修改客户跟踪/回访
     * 
     * @param xinfengCustomerTracking 客户跟踪/回访
     * @return 结果
     */
    @Override
    public int updateXinfengCustomerTracking(XinfengCustomerTracking xinfengCustomerTracking)
    {
        xinfengCustomerTracking.setUpdateTime(DateUtils.getNowDate());
        return xinfengCustomerTrackingMapper.updateXinfengCustomerTracking(xinfengCustomerTracking);
    }

    /**
     * 批量删除客户跟踪/回访
     * 
     * @param ids 需要删除的客户跟踪/回访主键
     * @return 结果
     */
    @Override
    public int deleteXinfengCustomerTrackingByIds(Long[] ids)
    {
        return xinfengCustomerTrackingMapper.deleteXinfengCustomerTrackingByIds(ids);
    }

    /**
     * 删除客户跟踪/回访信息
     * 
     * @param id 客户跟踪/回访主键
     * @return 结果
     */
    @Override
    public int deleteXinfengCustomerTrackingById(Long id)
    {
        return xinfengCustomerTrackingMapper.deleteXinfengCustomerTrackingById(id);
    }
}
